package jpm.session;

import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.*;
import jpm.entity.Platform;

@Stateless
public class JavaPlatformManagerBean
	implements jpm.session.JavaPlatformManagerRemote, jpm.session.JavaPlatformManagerLocal
{
	@PersistenceContext private EntityManager em;
	public void createPlatform (Platform plat) {
		em.persist(plat);
	}
	public List<Platform> listPlatforms () {
		return em.createQuery("select p from Platform p").getResultList();
	}
}
